$hasLinks = (bool)count( $this->getCanonicalParserOutput()->getLinks() );
}
- foreach ( $this->getModifiedSlotRoles() as $role ) {
+ foreach ( $this->getSlots()->getSlotRoles() as $role ) {
$roleHandler = $this->slotRoleRegistry->getRoleHandler( $role );
if ( $roleHandler->supportsArticleCount() ) {
$content = $this->getRawContent( $role );
self::assertSame( $isCountable, $updater->isCountable() );
}
+ /**
+ * @throws \MWException
+ * @covers \MediaWiki\Storage\DerivedPageDataUpdater::isCountable
+ */
+ public function testIsCountableNoModifiedSlots() {
+ $page = $this->getPage( __METHOD__ );
+ $content = [ 'main' => new WikitextContent( '[[Test]]' ) ];
+ $rev = $this->createRevision( $page, 'first', $content );
+ $nullRevision = MutableRevisionRecord::newFromParentRevision( $rev );
+ $nullRevision->setId( 14 );
+ $updater = $this->getDerivedPageDataUpdater( $page, $nullRevision );
+ $updater->prepareUpdate( $nullRevision );
+ $this->assertTrue( $updater->isCountable() );
+ }
+
/**
* @covers \MediaWiki\Storage\DerivedPageDataUpdater::doUpdates()
* @covers \MediaWiki\Storage\DerivedPageDataUpdater::doSecondaryDataUpdates()